import glob
src = glob.glob('*.c') + glob.glob('*.cpp')
env = Environment()
env.ParseConfig('allegro-config --cflags --libs')
env.Append(CFLAGS = ['-g', '-Wall', '-Wno-format', '--std=gnu99', '-fgnu89-inline'])
src.remove ('server_main.c')
src.remove ('server_network.c')
src.remove ('server_lobby.c')
src.remove ('server_game.c')
src.remove ('server_bailout.c')
env.Program(target = 'towerhack', source = src)
src.remove ('main.c')
src.remove ('network.c')
src.remove ('lobby.c')
src.remove ('game.c')
src.remove ('bailout.c')
src += glob.glob('server_*.c')
env.Program(target = 'towerhackd', source = src)
